<extend name="./public/frame.html"/>
<block name="content">
    <form class="layui-form" method="post" action="{:url('saveExpress')}">
        <input name="invoice_common_id" value="{$id}" hidden/>
        <table class="layui-table">
            <volist name="fields" id="field">
                <tr>
                    <td style="width: 15%;text-align: center;">{$field}</td>
                    <td>
                        <switch name="key">
                            <case value="remark">
                                <textarea rows="3" class="layui-textarea" onchange='this.value=this.value.substring(0, 80)'
                                          onkeydown='this.value=this.value.substring(0, 80)' placeholder="请输入{$field}"
                                          onkeyup='this.value=this.value.substring(0, 80)' maxlength='80' name="remark"></textarea>
                            </case>
                            <case value="express_at">
                                <input type="text" name="{$key}" id="express_at" placeholder="请输入{$field}" readonly class="layui-input" lay-verify="required"/>
                            </case>
                            <default/>
                            <input type="text" name="{$key}" placeholder="请输入{$field}" autocomplete="off" class="layui-input" lay-verify="required"/>
                        </switch>
                    </td>
                </tr>
            </volist>
            <tr>
                <td colspan="2">
                    <button class="layui-btn" lay-submit="" lay-filter="submit">提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </td>
            </tr>
        </table>

    </form>
    <script type="application/javascript">
        layui.use(['form', 'laydate'], function () {
            var form = layui.form
                , laydate = layui.laydate;
            laydate.render({
                elem: '#express_at'
            });
            //监听提交
            form.on('submit(submit)', function(data){
                //return false;
            });
        });
    </script>
</block>